home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Games for OS/2 Warp
/
Classic Games for OS2 Warp (1995)(IBM).iso
/
simcity
/
makeobj.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-07-12
|
3KB
|
78 lines
/* Rebuild gamepak icon for PMUNOO */
rc = RxFuncAdd( "SysCreateObject", "RexxUtil", "SysCreateObject" )
rc = RxFuncAdd( "SysDriveMap", "RexxUtil", "SysDriveMap" )
rc = RxFuncAdd( "SysDriveInfo", "RexxUtil", "SysDriveInfo" )
rc = RxFuncAdd( "SysFileTree", "RexxUtil", "SysFileTree" )
/* App setup strings */
Dir = "\FUNPAK\SIMCITY\" /*Directory to search for*/
ExeName = "SIMCITY.EXE" /*Exe File name*/
IconName = "SIMCITY.ICO" /*Icon title for exe file*/
FldrName = "FPFOLDER" /*destination folder for icons*/
Setup = "ICONFILE=" || IconName || ";EXENAME=" || ExeName || ";STARTUPDIR=" || Dir
/* get a list of all local drives */
Map = SysDriveMap( , "LOCAL" )
/* search for gamepak drive & dir */
Do I=1 to Words(Map)
Drive = Strip( Word(Map, I) )
/* Check if Drive is Accessable */
If ( (SysDriveInfo(Drive) \= "" ) & ,
(Strip(Word(SysDriveInfo, 2)) \= "0") ) then Do
/* Insure Exe File Exists */
rc = SysFileTree( Drive || Dir || ExeName, "File.", "FO" )
If (File.0 == 1) Then Do
/******************************************/
/* Exe found - create icons inside folder */
/******************************************/
Name = File.1
DestFolder = "<" || FldrName || ">"
/* Add Exe */
Class = "WPProgram"
Title = "Simcity"
Loc = DestFolder
Setup = "ICONFILE=" IconName || ";EXENAME=" || Name || ,
";STARTUPDIR=" || Drive || Dir
Opts = "Fail"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
/* Insure Icon was created: */
/* Might fail because object already exists (more than 1 */
/* copy installed?) Add drive letter to Title name and OBJID */
/* and try to recreate object */
If (ok == 0) Then Do
Title = Title || " on " || Drive
Opts = "Replace"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
End
/* Add Manual File */
Class = "WPProgram"
Title = "Simcity Manual"
Loc = DestFolder
Setup = "ICONFILE=" IconName || ";EXENAME=E.EXE" ,
";STARTUPDIR=" || Drive || Dir || ";PARAMETERS=MANUAL.TXT"
Opts = "Replace"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
/* Add Help File */
Class = "WPProgram"
Title = "Simcity ReadMe"
Loc = DestFolder
Setup = "ICONFILE=" IconName || ";EXENAME=E.EXE" ,
";STARTUPDIR=" || Drive || Dir || ";PARAMETERS=README"
Opts = "Replace"
ok = SysCreateObject( Class, Title, Loc, Setup, Opts )
End
End
End